<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="../static/ttt/css/my-peixun.css?<%=Math.random()%>">
</head>
<body>
<script type="text/javascript">
$(function(){
	$('#jilu_my ').datagrid({    
 		url:'gere_peixun', //数据源地
		 columns:[[    
		       {field:'empid',fixed:false,width:213,title:'员工编号',hidden:true,align:'center'},  
		       {field:'rusid',fixed:false,width:213,title:'课程编号',hidden:true,align:'center'},  
		       {field:'empname',fixed:false,width:213,title:'员工姓名',align:'center'},    
		       {field:'planname',fixed:false,width:213,title:'培训项目',align:'center'},
		       {field:'rusname',fixed:false,width:213,title:'培训课程',align:'center'},
		       {field:'plannind',fixed:false,width:213,title:'开始时间',align:'center',
		    	   formatter : function(value){
		        		var d = new Date(value);
		        		var times=d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate();
		        		return times;
		        	}   
		       },
		       {field:'planmaxd',fixed:false,width:213,title:'结束时间',align:'center',
		    	   formatter : function(value){
		        		var d = new Date(value);
		        		var times=d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate();
		        		return times;
		        	}     
		       },
		       {field:'plandd',fixed:false,width:213,title:'培训地点',align:'center'}
		       ]],
		   pagination:true,
		   pageNumber:1,
		   pageSize:5,
		   pageList:[5,10,15] 
	
	}); 

		$('#jieguo_my_').datagrid({    
			 url:'xiangmuJieguo_Byempid', //数据源地址
		   columns:[[    
		       {field:'empid',fixed:false,width:213,title:'员工编号',hidden:true,align:'center'},  
		       {field:'rusid',fixed:false,width:213,title:'课程编号',hidden:true,align:'center'},  
		       {field:'retrem',fixed:false,width:213,title:'结果状态',hidden:true,align:'center'},
		       {field:'retid',fixed:false,width:213,title:'结果id',hidden:true,align:'center'},
		       {field:'empname',fixed:false,width:213,title:'员工姓名',align:'center'},    
		       {field:'planname',fixed:false,width:213,title:'培训项目',align:'center'},
		       {field:'rusname',fixed:false,width:213,title:'培训课程',align:'center'},
		       {field:'clsname',fixed:false,width:213,title:'证书',align:'center',
		    	   formatter : function(value,row,index) {
				       	if(row['retrem']==0||row['retrem']==-1){
				       		return "<span  onclick=''>未获得"+value+"</span>";
				       	}else if(row['retrem']==1){
				       		return "<span  onclick=''>已获得"+value+"</span>";
				       	}
				   	}    
		       } ,
		       {field:'trtsfens',fixed:false,width:213,title:'分数',align:'center'},
		       {field:'caozuo',fixed:false,width:213,title:'操作',align:'center',
		    	   formatter : function(value,row,index) {
				       	if(row['retrem']==1){
				    		return "<span  onclick=''style='color:green;'>已通过</span>";
				    	}else if(row['retrem']==-1){
				    		return "<span  onclick=''style='color:red;'>未通过</span>";
				    	}else if(row['retrem']==0){
				    		return "<span  onclick=''>待赋证</span>";
				    	}
				   	}   
		       }
		       ]],
		   pagination:true,
		   pageNumber:1,
		   pageSize:5,
		   pageList:[5,10,15] 
		}); 
	
})
</script>
<!-- 	<div class="table_1">
		<table id="peixuntable" class="easyui-datagrid" style="width:100%;height:470px;" data-options="fitColumns:true">
					
		</table>
	</div> -->
	
		<div id=my_peixun class="easyui-tabs" style="width:100%;height:500px;">
		    <div title="培训记录" style="padding:20px;display:none;">
				<table id="jilu_my" class="easyui-datagrid"
				style="width:100%;"
			    	data-options="fitColumns:true,fit:true,singleSelect:true">
				</table>
		    </div>
		    <div title="培训结果" style="overflow:auto;padding:20px;display:none;">
				<table id="jieguo_my_" class="easyui-datagrid"
			    	data-options="fitColumns:true,fit:true,singleSelect:true">
				</table>
		    </div>
	</div>
</body>
</html>